<td><input type="checkbox" name="id[]" id="ck_{$vo.id}" onclick="single(this)" value="{$vo.id}"></td>
<td>
    <!--查找路线名称-->
    {if !empty($vo['route_id'])}
    <?php
        echo Db::name('route')->where('id',$vo['route_id'])->value('title');
    ?>
    {/if}
</td>
<td>{$vo.id}</td>
<td>
    <a title="详细资料" href="javascript:;" onclick="driverInfo({$vo.driver_user_id})" style="text-decoration:none">
        <!--查找司机名称-->
        {if !empty($vo['driver_user_id'])}
        <?php
        echo Db::name('admin_user')->where('id',$vo['driver_user_id'])->value('realname');
        ?>
        {/if}
    </a>
</td>
<td>{$vo.check_in_date|date="Y-m-d",###}</td>
<td>
    {foreach $list_data as $v}
    {if $v['id'] == $vo['id']}
    {$v.booking_people_name}
    {/if}
    {/foreach}
    {if empty($vo['order_travel_ids']) && !empty($vo['name_of_passenger'])}
    {$vo.name_of_passenger}
    {/if}
</td>
<td>
    {foreach $list_data as $v}
    {if $v['id'] == $vo['id']}
    {$v.booking_people_num}
    {/if}
    {/foreach}
</td>
<td>
    <!--查找酒店名称-->
    {if !empty($vo['hotel_id'])}
    <?php
        echo Db::name('hotel')->where('id',$vo['hotel_id'])->value('hotel_name');
    ?>
    {/if}
</td>
<td>
    <!--查找酒店名称-->
    {if !empty($vo['hotel_room_type'])}
    <?php
        echo Db::name('hotel_room_type')->where('id',$vo['hotel_room_type'])->value('room_name');
    ?>
    {/if}
</td>
<td>{php}
        $num = round(($vo['end_date']-$vo['check_in_date'])/3600/24);
        echo $num;
    {/php}</td>
<td>{$vo.unit_price}</td>
<td>
    {php}
    echo (int)$num * (int)$vo['unit_price'];
    {/php}
</td>
<td>{$vo.remark}</td>
<script>
    function driverInfo(driver_user_id) {
        var url = '/admin/hotel_accommodation/details';
        if (!driver_user_id){
            layer.msg('缺少必要的参数');
        }
        $.ajax({
            type: 'get',
            url: url,
            data:{ driver_user_id: driver_user_id },
            success: function (data) {
                if (data.code == 1){
                    layer.msg(data.msg)
                    return false
                }else{
                    layer_open('详细资料','/admin/hotel_accommodation/details/driver_user_id/'+driver_user_id,{w:'1300px',h:'750px'})
                }
            }
        })
    }
</script>